import type { Metadata } from "next";
import "@/static/style/globals.scss";
import { AntdRegistry } from "@ant-design/nextjs-registry";
import { ConfigProvider } from "antd";
import theme from '@/static/theme/themeConfig';
import enUS from "antd/locale/en_US";
import Header from "@/components/layout/header";
import Footer from "@/components/layout/footer";

export const metadata: Metadata = {
  title: "app title",
  description: "app description",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <head>
        <meta httpEquiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
        <meta httpEquiv="Pragma" content="no-cache" />
        <meta httpEquiv="Expires" content="0" />
        <script dangerouslySetInnerHTML={{
          __html: `console.log('hello world')`
          }}>
        </script>
      </head>
      <body >
      <ConfigProvider theme={theme} locale={enUS}>
            <AntdRegistry>
              <Header />
              <div className=" layout-content">
                {children}
              </div>
              <Footer />
            </AntdRegistry>
        </ConfigProvider>
      </body>
    </html>
  );
}
